import React, { Component } from 'react'
import {NavLink, Route} from "react-router-dom"
import Home from './pages/Home'
import About from './pages/About'
import Header from "./components/Header"
import "./App.css"

export default class App extends Component {

	render() {
		return (
			<div className="box">
				<Header a={1} />
				<div className="content">
					<div className="left">
						{/*NavLink默认选中的样式就是active*/}
						<NavLink activeClassName="atv" className="link-btn" to="/about">About</NavLink>
						<NavLink activeClassName="atv" className="link-btn" to="/home">Home</NavLink>
					</div>
					<div className="right">
						<Route path="/about" component={About}/>
						<Route path="/home" component={Home}/>
					</div>
				</div>
			</div>
		)
	}
}
